home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / montor.zip / MONSRC.ZIP / MONTOR.TXT < prev    next >
Text File  |  1993-09-26  |  43KB  |  1,308 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "MONTOR System Monitor"
  6.    ClientHeight    =   5145
  7.    ClientLeft      =   15
  8.    ClientTop       =   825
  9.    ClientWidth     =   9150
  10.    ForeColor       =   &H0000FFFF&
  11.    Height          =   6075
  12.    Icon            =   0
  13.    Left            =   -45
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   5145
  17.    ScaleWidth      =   9150
  18.    Top             =   -45
  19.    Width           =   9270
  20.    Begin PictureBox GaugeMain 
  21.       AutoSize        =   -1  'True
  22.       BackColor       =   &H00C0C0C0&
  23.       BorderStyle     =   0  'None
  24.       FillStyle       =   0  'Solid
  25.       ForeColor       =   &H0000FFFF&
  26.       Height          =   3225
  27.       Index           =   0
  28.       Left            =   1680
  29.       Picture         =   MONTOR.FRX:0000
  30.       ScaleHeight     =   3225
  31.       ScaleWidth      =   720
  32.       TabIndex        =   0
  33.       Tag             =   "100"
  34.       Top             =   840
  35.       Width           =   720
  36.       Begin Image WarnLevPtr 
  37.          DragIcon        =   MONTOR.FRX:14A2
  38.          DragMode        =   1  'Automatic
  39.          Height          =   165
  40.          Index           =   0
  41.          Left            =   420
  42.          Picture         =   MONTOR.FRX:15EC
  43.          Top             =   3000
  44.          Width           =   300
  45.       End
  46.       Begin Image CurrValPtr 
  47.          Height          =   165
  48.          Index           =   0
  49.          Left            =   0
  50.          Picture         =   MONTOR.FRX:16EA
  51.          Top             =   0
  52.          Width           =   300
  53.       End
  54.    End
  55.    Begin PictureBox GaugeMain 
  56.       AutoSize        =   -1  'True
  57.       BackColor       =   &H00C0C0C0&
  58.       BorderStyle     =   0  'None
  59.       FillStyle       =   0  'Solid
  60.       ForeColor       =   &H0000FFFF&
  61.       Height          =   3225
  62.       Index           =   7
  63.       Left            =   8280
  64.       ScaleHeight     =   3225
  65.       ScaleWidth      =   750
  66.       TabIndex        =   7
  67.       TabStop         =   0   'False
  68.       Tag             =   "100"
  69.       Top             =   840
  70.       Width           =   750
  71.       Begin Image CurrValPtr 
  72.          Height          =   165
  73.          Index           =   7
  74.          Left            =   0
  75.          Top             =   0
  76.          Width           =   300
  77.       End
  78.       Begin Image WarnLevPtr 
  79.          DragIcon        =   MONTOR.FRX:17E8
  80.          DragMode        =   1  'Automatic
  81.          Height          =   165
  82.          Index           =   7
  83.          Left            =   420
  84.          Top             =   3000
  85.          Width           =   300
  86.       End
  87.    End
  88.    Begin PictureBox GaugeMain 
  89.       AutoSize        =   -1  'True
  90.       BackColor       =   &H00C0C0C0&
  91.       BorderStyle     =   0  'None
  92.       FillStyle       =   0  'Solid
  93.       ForeColor       =   &H0000FFFF&
  94.       Height          =   3225
  95.       Index           =   6
  96.       Left            =   7320
  97.       ScaleHeight     =   3225
  98.       ScaleWidth      =   750
  99.       TabIndex        =   6
  100.       TabStop         =   0   'False
  101.       Tag             =   "100"
  102.       Top             =   840
  103.       Width           =   750
  104.       Begin Image CurrValPtr 
  105.          Height          =   165
  106.          Index           =   6
  107.          Left            =   0
  108.          Top             =   0
  109.          Width           =   300
  110.       End
  111.       Begin Image WarnLevPtr 
  112.          DragIcon        =   MONTOR.FRX:1932
  113.          DragMode        =   1  'Automatic
  114.          Height          =   165
  115.          Index           =   6
  116.          Left            =   420
  117.          Top             =   3000
  118.          Width           =   300
  119.       End
  120.    End
  121.    Begin PictureBox GaugeMain 
  122.       AutoSize        =   -1  'True
  123.       BackColor       =   &H00C0C0C0&
  124.       BorderStyle     =   0  'None
  125.       FillStyle       =   0  'Solid
  126.       ForeColor       =   &H0000FFFF&
  127.       Height          =   3225
  128.       Index           =   5
  129.       Left            =   6360
  130.       ScaleHeight     =   3225
  131.       ScaleWidth      =   750
  132.       TabIndex        =   5
  133.       TabStop         =   0   'False
  134.       Tag             =   "100"
  135.       Top             =   840
  136.       Width           =   750
  137.       Begin Image CurrValPtr 
  138.          Height          =   165
  139.          Index           =   5
  140.          Left            =   0
  141.          Top             =   0
  142.          Width           =   300
  143.       End
  144.       Begin Image WarnLevPtr 
  145.          DragIcon        =   MONTOR.FRX:1A7C
  146.          DragMode        =   1  'Automatic
  147.          Height          =   165
  148.          Index           =   5
  149.          Left            =   420
  150.          Top             =   3000
  151.          Width           =   300
  152.       End
  153.    End
  154.    Begin PictureBox GaugeMain 
  155.       AutoSize        =   -1  'True
  156.       BackColor       =   &H00C0C0C0&
  157.       BorderStyle     =   0  'None
  158.       FillStyle       =   0  'Solid
  159.       ForeColor       =   &H0000FFFF&
  160.       Height          =   3225
  161.       Index           =   4
  162.       Left            =   5400
  163.       ScaleHeight     =   3225
  164.       ScaleWidth      =   750
  165.       TabIndex        =   4
  166.       TabStop         =   0   'False
  167.       Tag             =   "100"
  168.       Top             =   840
  169.       Width           =   750
  170.       Begin Image CurrValPtr 
  171.          Height          =   165
  172.          Index           =   4
  173.          Left            =   0
  174.          Top             =   0
  175.          Width           =   300
  176.       End
  177.       Begin Image WarnLevPtr 
  178.          DragIcon        =   MONTOR.FRX:1BC6
  179.          DragMode        =   1  'Automatic
  180.          Height          =   165
  181.          Index           =   4
  182.          Left            =   420
  183.          Top             =   3000
  184.          Width           =   300
  185.       End
  186.    End
  187.    Begin PictureBox GaugeMain 
  188.       AutoSize        =   -1  'True
  189.       BackColor       =   &H00C0C0C0&
  190.       BorderStyle     =   0  'None
  191.       FillStyle       =   0  'Solid
  192.       ForeColor       =   &H0000FFFF&
  193.       Height          =   3225
  194.       Index           =   3
  195.       Left            =   4440
  196.       ScaleHeight     =   3225
  197.       ScaleWidth      =   750
  198.       TabIndex        =   3
  199.       Tag             =   "100"
  200.       Top             =   840
  201.       Width           =   750
  202.       Begin Image CurrValPtr 
  203.          Height          =   165
  204.          Index           =   3
  205.          Left            =   0
  206.          Top             =   0
  207.          Width           =   300
  208.       End
  209.       Begin Image WarnLevPtr 
  210.          DragIcon        =   MONTOR.FRX:1D10
  211.          DragMode        =   1  'Automatic
  212.          Height          =   165
  213.          Index           =   3
  214.          Left            =   420
  215.          Top             =   3000
  216.          Width           =   300
  217.       End
  218.    End
  219.    Begin Timer Timer1 
  220.       Interval        =   2000
  221.       Left            =   120
  222.       Top             =   3480
  223.    End
  224.    Begin PictureBox GaugeMain 
  225.       AutoSize        =   -1  'True
  226.       BackColor       =   &H00C0C0C0&
  227.       BorderStyle     =   0  'None
  228.       FillStyle       =   0  'Solid
  229.       ForeColor       =   &H0000FFFF&
  230.       Height          =   3225
  231.       Index           =   2
  232.       Left            =   3480
  233.       ScaleHeight     =   3225
  234.       ScaleWidth      =   750
  235.       TabIndex        =   2
  236.       Tag             =   "100"
  237.       Top             =   840
  238.       Width           =   750
  239.       Begin Image CurrValPtr 
  240.          Height          =   165
  241.          Index           =   2
  242.          Left            =   0
  243.          Top             =   0
  244.          Width           =   300
  245.       End
  246.       Begin Image WarnLevPtr 
  247.          DragIcon        =   MONTOR.FRX:1E5A
  248.          DragMode        =   1  'Automatic
  249.          Height          =   165
  250.          Index           =   2
  251.          Left            =   420
  252.          Top             =   3000
  253.          Width           =   300
  254.       End
  255.    End
  256.    Begin PictureBox GaugeMain 
  257.       AutoSize        =   -1  'True
  258.       BackColor       =   &H00C0C0C0&
  259.       BorderStyle     =   0  'None
  260.       FillStyle       =   0  'Solid
  261.       ForeColor       =   &H0000FFFF&
  262.       Height          =   3225
  263.       Index           =   1
  264.       Left            =   2520
  265.       ScaleHeight     =   3225
  266.       ScaleWidth      =   750
  267.       TabIndex        =   1
  268.       Tag             =   "100"
  269.       Top             =   840
  270.       Width           =   750
  271.       Begin Image WarnLevPtr 
  272.          DragIcon        =   MONTOR.FRX:1FA4
  273.          DragMode        =   1  'Automatic
  274.          Height          =   165
  275.          Index           =   1
  276.          Left            =   420
  277.          Top             =   3000
  278.          Width           =   300
  279.       End
  280.       Begin Image CurrValPtr 
  281.          Height          =   165
  282.          Index           =   1
  283.          Left            =   0
  284.          Top             =   0
  285.          Width           =   300
  286.       End
  287.    End
  288.    Begin Shape Circ 
  289.       BackColor       =   &H00000080&
  290.       BackStyle       =   1  'Opaque
  291.       Height          =   735
  292.       Index           =   1
  293.       Left            =   480
  294.       Shape           =   3  'Circle
  295.       Top             =   2760
  296.       Width           =   735
  297.    End
  298.    Begin Shape Circ 
  299.       BackColor       =   &H000000FF&
  300.       BackStyle       =   1  'Opaque
  301.       Height          =   735
  302.       Index           =   0
  303.       Left            =   480
  304.       Shape           =   3  'Circle
  305.       Top             =   1320
  306.       Width           =   735
  307.    End
  308.    Begin Label RowLabel 
  309.       Alignment       =   1  'Right Justify
  310.       BackColor       =   &H00000000&
  311.       Caption         =   "Warn At:"
  312.       ForeColor       =   &H00FFFFFF&
  313.       Height          =   255
  314.       Index           =   4
  315.       Left            =   120
  316.       TabIndex        =   46
  317.       Top             =   4800
  318.       Width           =   1335
  319.    End
  320.    Begin Label RowLabel 
  321.       Alignment       =   1  'Right Justify
  322.       BackColor       =   &H00000000&
  323.       Caption         =   "Percent Free:"
  324.       ForeColor       =   &H00FFFFFF&
  325.       Height          =   255
  326.       Index           =   3
  327.       Left            =   120
  328.       TabIndex        =   45
  329.       Top             =   4440
  330.       Width           =   1335
  331.    End
  332.    Begin Label RowLabel 
  333.       Alignment       =   1  'Right Justify
  334.       BackColor       =   &H00000000&
  335.       Caption         =   "Free:"
  336.       ForeColor       =   &H00FFFFFF&
  337.       Height          =   255
  338.       Index           =   2
  339.       Left            =   120
  340.       TabIndex        =   44
  341.       Top             =   4080
  342.       Width           =   1335
  343.    End
  344.    Begin Label RowLabel 
  345.       Alignment       =   1  'Right Justify
  346.       BackColor       =   &H00000000&
  347.       Caption         =   "Max Value:"
  348.       ForeColor       =   &H00FFFFFF&
  349.       Height          =   255
  350.       Index           =   1
  351.       Left            =   120
  352.       TabIndex        =   43
  353.       Top             =   480
  354.       Width           =   1335
  355.    End
  356.    Begin Label RowLabel 
  357.       Alignment       =   1  'Right Justify
  358.       BackColor       =   &H00000000&
  359.       Caption         =   "Resource:"
  360.       ForeColor       =   &H00FFFFFF&
  361.       Height          =   255
  362.       Index           =   0
  363.       Left            =   120
  364.       TabIndex        =   42
  365.       Top             =   120
  366.       Width           =   1335
  367.    End
  368.    Begin Label CurrValLab 
  369.       Alignment       =   1  'Right Justify
  370.       BackColor       =   &H00000000&
  371.       Caption         =   "0k"
  372.       FontBold        =   -1  'True
  373.       FontItalic      =   0   'False
  374.       FontName        =   "Arial"
  375.       FontSize        =   8.25
  376.       FontStrikethru  =   0   'False
  377.       FontUnderline   =   0   'False
  378.       ForeColor       =   &H0000FFFF&
  379.       Height          =   255
  380.       Index           =   7
  381.       Left            =   8280
  382.       TabIndex        =   29
  383.       Top             =   4080
  384.       Width           =   735
  385.    End
  386.    Begin Label CurrValLab 
  387.       Alignment       =   1  'Right Justify
  388.       BackColor       =   &H00000000&
  389.       Caption         =   "0k"
  390.       FontBold        =   -1  'True
  391.       FontItalic      =   0   'False
  392.       FontName        =   "Arial"
  393.       FontSize        =   8.25
  394.       FontStrikethru  =   0   'False
  395.       FontUnderline   =   0   'False
  396.       ForeColor       =   &H0000FFFF&
  397.       Height          =   255
  398.       Index           =   6
  399.       Left            =   7320
  400.       TabIndex        =   30
  401.       Top             =   4080
  402.       Width           =   735
  403.    End
  404.    Begin Label CurrValLab 
  405.       Alignment       =   1  'Right Justify
  406.       BackColor       =   &H00000000&
  407.       Caption         =   "0k"
  408.       FontBold        =   -1  'True
  409.       FontItalic      =   0   'False
  410.       FontName        =   "Arial"
  411.       FontSize        =   8.25
  412.       FontStrikethru  =   0   'False
  413.       FontUnderline   =   0   'False
  414.       ForeColor       =   &H0000FFFF&
  415.       Height          =   255
  416.       Index           =   5
  417.       Left            =   6360
  418.       TabIndex        =   31
  419.       Top             =   4080
  420.       Width           =   735
  421.    End
  422.    Begin Label CurrValLab 
  423.       Alignment       =   1  'Right Justify
  424.       BackColor       =   &H00000000&
  425.       Caption         =   "0k"
  426.       FontBold        =   -1  'True
  427.       FontItalic      =   0   'False
  428.       FontName        =   "Arial"
  429.       FontSize        =   8.25
  430.       FontStrikethru  =   0   'False
  431.       FontUnderline   =   0   'False
  432.       ForeColor       =   &H0000FFFF&
  433.       Height          =   255
  434.       Index           =   4
  435.       Left            =   5400
  436.       TabIndex        =   41
  437.       Top             =   4080
  438.       Width           =   735
  439.    End
  440.    Begin Label CurrValLab 
  441.       Alignment       =   1  'Right Justify
  442.       BackColor       =   &H00000000&
  443.       Caption         =   "0k"
  444.       FontBold        =   -1  'True
  445.       FontItalic      =   0   'False
  446.       FontName        =   "Arial"
  447.       FontSize        =   8.25
  448.       FontStrikethru  =   0   'False
  449.       FontUnderline   =   0   'False
  450.       ForeColor       =   &H0000FFFF&
  451.       Height          =   255
  452.       Index           =   3
  453.       Left            =   4440
  454.       TabIndex        =   40
  455.       Top             =   4080
  456.       Width           =   735
  457.    End
  458.    Begin Label PercentLab 
  459.       Alignment       =   1  'Right Justify
  460.       BackColor       =   &H00000000&
  461.       Caption         =   "0%"
  462.       ForeColor       =   &H0000FFFF&
  463.       Height          =   255
  464.       Index           =   7
  465.       Left            =   8280
  466.       TabIndex        =   36
  467.       Top             =   4440
  468.       Width           =   735
  469.    End
  470.    Begin Label HeadingLab 
  471.       Alignment       =   2  'Center
  472.       BackColor       =   &H00000000&
  473.       Caption         =   "Drive F:"
  474.       ForeColor       =   &H0000FFFF&
  475.       Height          =   255
  476.       Index           =   7
  477.       Left            =   8280
  478.       TabIndex        =   37
  479.       Top             =   120
  480.       Width           =   735
  481.    End
  482.    Begin Label WarnLabel 
  483.       Alignment       =   1  'Right Justify
  484.       BackColor       =   &H00000000&
  485.       Caption         =   "20%"
  486.       ForeColor       =   &H0000FFFF&
  487.       Height          =   255
  488.       Index           =   7
  489.       Left            =   8280
  490.       TabIndex        =   38
  491.       Top             =   4800
  492.       Width           =   735
  493.    End
  494.    Begin Label MaxValueLab 
  495.       Alignment       =   1  'Right Justify
  496.       BackColor       =   &H00000000&
  497.       Caption         =   "999,999k"
  498.       FontBold        =   -1  'True
  499.       FontItalic      =   0   'False
  500.       FontName        =   "Arial"
  501.       FontSize        =   8.25
  502.       FontStrikethru  =   0   'False
  503.       FontUnderline   =   0   'False
  504.       ForeColor       =   &H0000FFFF&
  505.       Height          =   255
  506.       Index           =   7
  507.       Left            =   8280
  508.       TabIndex        =   39
  509.       Top             =   480
  510.       Width           =   735
  511.    End
  512.    Begin Label MaxValueLab 
  513.       Alignment       =   1  'Right Justify
  514.       BackColor       =   &H00000000&
  515.       Caption         =   "999,999k"
  516.       FontBold        =   -1  'True
  517.       FontItalic      =   0   'False
  518.       FontName        =   "Arial"
  519.       FontSize        =   8.25
  520.       FontStrikethru  =   0   'False
  521.       FontUnderline   =   0   'False
  522.       ForeColor       =   &H0000FFFF&
  523.       Height          =   255
  524.       Index           =   6
  525.       Left            =   7320
  526.       TabIndex        =   35
  527.       Top             =   480
  528.       Width           =   735
  529.    End
  530.    Begin Label MaxValueLab 
  531.       Alignment       =   1  'Right Justify
  532.       BackColor       =   &H00000000&
  533.       Caption         =   "999,999k"
  534.       FontBold        =   -1  'True
  535.       FontItalic      =   0   'False
  536.       FontName        =   "Arial"
  537.       FontSize        =   8.25
  538.       FontStrikethru  =   0   'False
  539.       FontUnderline   =   0   'False
  540.       ForeColor       =   &H0000FFFF&
  541.       Height          =   255
  542.       Index           =   5
  543.       Left            =   6360
  544.       TabIndex        =   34
  545.       Top             =   480
  546.       Width           =   735
  547.    End
  548.    Begin Label MaxValueLab 
  549.       Alignment       =   1  'Right Justify
  550.       BackColor       =   &H00000000&
  551.       Caption         =   "999,999k"
  552.       FontBold        =   -1  'True
  553.       FontItalic      =   0   'False
  554.       FontName        =   "Arial"
  555.       FontSize        =   8.25
  556.       FontStrikethru  =   0   'False
  557.       FontUnderline   =   0   'False
  558.       ForeColor       =   &H0000FFFF&
  559.       Height          =   255
  560.       Index           =   4
  561.       Left            =   5400
  562.       TabIndex        =   33
  563.       Top             =   480
  564.       Width           =   735
  565.    End
  566.    Begin Label MaxValueLab 
  567.       Alignment       =   1  'Right Justify
  568.       BackColor       =   &H00000000&
  569.       Caption         =   "999,999k"
  570.       FontBold        =   -1  'True
  571.       FontItalic      =   0   'False
  572.       FontName        =   "Arial"
  573.       FontSize        =   8.25
  574.       FontStrikethru  =   0   'False
  575.       FontUnderline   =   0   'False
  576.       ForeColor       =   &H0000FFFF&
  577.       Height          =   255
  578.       Index           =   3
  579.       Left            =   4440
  580.       TabIndex        =   32
  581.       Top             =   480
  582.       Width           =   735
  583.    End
  584.    Begin Label WarnLabel 
  585.       Alignment       =   1  'Right Justify
  586.       BackColor       =   &H00000000&
  587.       Caption         =   "20%"
  588.       ForeColor       =   &H0000FFFF&
  589.       Height          =   255
  590.       Index           =   6
  591.       Left            =   7320
  592.       TabIndex        =   28
  593.       Top             =   4800
  594.       Width           =   735
  595.    End
  596.    Begin Label HeadingLab 
  597.       Alignment       =   2  'Center
  598.       BackColor       =   &H00000000&
  599.       Caption         =   "Drive E:"
  600.       ForeColor       =   &H0000FFFF&
  601.       Height          =   255
  602.       Index           =   6
  603.       Left            =   7320
  604.       TabIndex        =   27
  605.       Top             =   120
  606.       Width           =   735
  607.    End
  608.    Begin Label PercentLab 
  609.       Alignment       =   1  'Right Justify
  610.       BackColor       =   &H00000000&
  611.       Caption         =   "0%"
  612.       ForeColor       =   &H0000FFFF&
  613.       Height          =   255
  614.       Index           =   6
  615.       Left            =   7320
  616.       TabIndex        =   26
  617.       Top             =   4440
  618.       Width           =   735
  619.    End
  620.    Begin Label WarnLabel 
  621.       Alignment       =   1  'Right Justify
  622.       BackColor       =   &H00000000&
  623.       Caption         =   "20%"
  624.       ForeColor       =   &H0000FFFF&
  625.       Height          =   255
  626.       Index           =   5
  627.       Left            =   6360
  628.       TabIndex        =   25
  629.       Top             =   4800
  630.       Width           =   735
  631.    End
  632.    Begin Label HeadingLab 
  633.       Alignment       =   2  'Center
  634.       BackColor       =   &H00000000&
  635.       Caption         =   "Drive D:"
  636.       ForeColor       =   &H0000FFFF&
  637.       Height          =   255
  638.       Index           =   5
  639.       Left            =   6360
  640.       TabIndex        =   24
  641.       Top             =   120
  642.       Width           =   735
  643.    End
  644.    Begin Label PercentLab 
  645.       Alignment       =   1  'Right Justify
  646.       BackColor       =   &H00000000&
  647.       Caption         =   "0%"
  648.       ForeColor       =   &H0000FFFF&
  649.       Height          =   255
  650.       Index           =   5
  651.       Left            =   6360
  652.       TabIndex        =   23
  653.       Top             =   4440
  654.       Width           =   735
  655.    End
  656.    Begin Label WarnLabel 
  657.       Alignment       =   1  'Right Justify
  658.       BackColor       =   &H00000000&
  659.       Caption         =   "20%"
  660.       ForeColor       =   &H0000FFFF&
  661.       Height          =   255
  662.       Index           =   4
  663.       Left            =   5400
  664.       TabIndex        =   22
  665.       Top             =   4800
  666.       Width           =   735
  667.    End
  668.    Begin Label HeadingLab 
  669.       Alignment       =   2  'Center
  670.       BackColor       =   &H00000000&
  671.       Caption         =   "Drive C:"
  672.       ForeColor       =   &H0000FFFF&
  673.       Height          =   255
  674.       Index           =   4
  675.       Left            =   5400
  676.       TabIndex        =   21
  677.       Top             =   120
  678.       Width           =   735
  679.    End
  680.    Begin Label PercentLab 
  681.       Alignment       =   1  'Right Justify
  682.       BackColor       =   &H00000000&
  683.       Caption         =   "0%"
  684.       ForeColor       =   &H0000FFFF&
  685.       Height          =   255
  686.       Index           =   4
  687.       Left            =   5400
  688.       TabIndex        =   20
  689.       Top             =   4440
  690.       Width           =   735
  691.    End
  692.    Begin Label PercentLab 
  693.       Alignment       =   1  'Right Justify
  694.       BackColor       =   &H00000000&
  695.       Caption         =   "0%"
  696.       ForeColor       =   &H0000FFFF&
  697.       Height          =   255
  698.       Index           =   3
  699.       Left            =   4440
  700.       TabIndex        =   19
  701.       Top             =   4440
  702.       Width           =   735
  703.    End
  704.    Begin Label HeadingLab 
  705.       Alignment       =   2  'Center
  706.       BackColor       =   &H00000000&
  707.       Caption         =   "Memory"
  708.       ForeColor       =   &H0000FFFF&
  709.       Height          =   255
  710.       Index           =   3
  711.       Left            =   4440
  712.       TabIndex        =   18
  713.       Top             =   120
  714.       Width           =   735
  715.    End
  716.    Begin Label WarnLabel 
  717.       Alignment       =   1  'Right Justify
  718.       BackColor       =   &H00000000&
  719.       Caption         =   "20%"
  720.       ForeColor       =   &H0000FFFF&
  721.       Height          =   255
  722.       Index           =   3
  723.       Left            =   4440
  724.       TabIndex        =   17
  725.       Top             =   4800
  726.       Width           =   735
  727.    End
  728.    Begin Label WarnLabel 
  729.       Alignment       =   1  'Right Justify
  730.       BackColor       =   &H00000000&
  731.       Caption         =   "20%"
  732.       ForeColor       =   &H0000FFFF&
  733.       Height          =   255
  734.       Index           =   2
  735.       Left            =   3480
  736.       TabIndex        =   16
  737.       Top             =   4800
  738.       Width           =   735
  739.    End
  740.    Begin Label WarnLabel 
  741.       Alignment       =   1  'Right Justify
  742.       BackColor       =   &H00000000&
  743.       Caption         =   "20%"
  744.       ForeColor       =   &H0000FFFF&
  745.       Height          =   255
  746.       Index           =   1
  747.       Left            =   2520
  748.       TabIndex        =   15
  749.       Top             =   4800
  750.       Width           =   735
  751.    End
  752.    Begin Label WarnLabel 
  753.       Alignment       =   1  'Right Justify
  754.       BackColor       =   &H00000000&
  755.       Caption         =   "20%"
  756.       ForeColor       =   &H0000FFFF&
  757.       Height          =   255
  758.       Index           =   0
  759.       Left            =   1560
  760.       TabIndex        =   14
  761.       Top             =   4800
  762.       Width           =   735
  763.    End
  764.    Begin Label HeadingLab 
  765.       Alignment       =   2  'Center
  766.       BackColor       =   &H00000000&
  767.       Caption         =   "User"
  768.       ForeColor       =   &H0000FFFF&
  769.       Height          =   255
  770.       Index           =   2
  771.       Left            =   3480
  772.       TabIndex        =   13
  773.       Top             =   120
  774.       Width           =   735
  775.    End
  776.    Begin Label HeadingLab 
  777.       Alignment       =   2  'Center
  778.       BackColor       =   &H00000000&
  779.       Caption         =   "GDI"
  780.       ForeColor       =   &H0000FFFF&
  781.       Height          =   255
  782.       Index           =   1
  783.       Left            =   2520
  784.       TabIndex        =   12
  785.       Top             =   120
  786.       Width           =   735
  787.    End
  788.    Begin Label HeadingLab 
  789.       Alignment       =   2  'Center
  790.       BackColor       =   &H00000000&
  791.       Caption         =   "System"
  792.       ForeColor       =   &H0000FFFF&
  793.       Height          =   255
  794.       Index           =   0
  795.       Left            =   1560
  796.       TabIndex        =   11
  797.       Top             =   120
  798.       Width           =   735
  799.    End
  800.    Begin Label PercentLab 
  801.       Alignment       =   1  'Right Justify
  802.       BackColor       =   &H00000000&
  803.       Caption         =   "0%"
  804.       ForeColor       =   &H0000FFFF&
  805.       Height          =   255
  806.       Index           =   2
  807.       Left            =   3480
  808.       TabIndex        =   10
  809.       Top             =   4440
  810.       Width           =   735
  811.    End
  812.    Begin Label PercentLab 
  813.       Alignment       =   1  'Right Justify
  814.       BackColor       =   &H00000000&
  815.       Caption         =   "0%"
  816.       ForeColor       =   &H0000FFFF&
  817.       Height          =   255
  818.       Index           =   1
  819.       Left            =   2520
  820.       TabIndex        =   9
  821.       Top             =   4440
  822.       Width           =   735
  823.    End
  824.    Begin Label PercentLab 
  825.       Alignment       =   1  'Right Justify
  826.       BackColor       =   &H00000000&
  827.       Caption         =   "0%"
  828.       ForeColor       =   &H0000FFFF&
  829.       Height          =   255
  830.       Index           =   0
  831.       Left            =   1560
  832.       TabIndex        =   8
  833.       Top             =   4440
  834.       Width           =   735
  835.    End
  836.    Begin Menu mnu_Main 
  837.       Caption         =   "&File"
  838.       Index           =   0
  839.       Begin Menu mnu_File 
  840.          Caption         =   "E&xit"
  841.          Index           =   0
  842.       End
  843.    End
  844.    Begin Menu mnu_Main 
  845.       Caption         =   "&Options"
  846.       Index           =   1
  847.       Begin Menu mnu_Options 
  848.          Caption         =   "&Jiggle pointers"
  849.          Checked         =   -1  'True
  850.          HelpContextID   =   6
  851.          Index           =   0
  852.       End
  853.       Begin Menu mnu_Options 
  854.          Caption         =   "&Save Settings On Exit"
  855.          Checked         =   -1  'True
  856.          HelpContextID   =   7
  857.          Index           =   1
  858.       End
  859.    End
  860.    Begin Menu mnu_Main 
  861.       Caption         =   "&Icon Display"
  862.       Index           =   2
  863.       Begin Menu mnu_Icon 
  864.          Caption         =   "&System"
  865.          HelpContextID   =   1
  866.          Index           =   0
  867.       End
  868.       Begin Menu mnu_Icon 
  869.          Caption         =   "&GDI"
  870.          HelpContextID   =   1
  871.          Index           =   1
  872.       End
  873.       Begin Menu mnu_Icon 
  874.          Caption         =   "&User"
  875.          HelpContextID   =   1
  876.          Index           =   2
  877.       End
  878.       Begin Menu mnu_Icon 
  879.          Caption         =   "&Memory"
  880.          HelpContextID   =   2
  881.          Index           =   3
  882.       End
  883.    End
  884.    Begin Menu mnu_Main 
  885.       Caption         =   "&Help"
  886.       Index           =   4
  887.       Begin Menu mnu_Help 
  888.          Caption         =   "&Contents"
  889.          Index           =   0
  890.       End
  891.       Begin Menu mnu_Help 
  892.          Caption         =   "&Search for Help On..."
  893.          Index           =   1
  894.       End
  895.       Begin Menu mnu_Help 
  896.          Caption         =   "&How to Use Help"
  897.          Index           =   2
  898.       End
  899.       Begin Menu mnu_Help 
  900.          Caption         =   "-"
  901.          Index           =   3
  902.       End
  903.       Begin Menu mnu_Help 
  904.          Caption         =   "&About Montor..."
  905.          Index           =   4
  906.       End
  907.    End
  908. End
  909. Option Explicit
  910. Dim TopAdj%         ' distance of 100% mark from top of gauge
  911. Dim GHeight!        ' height of gauge - used in several routines
  912. Dim WhichIcon%      ' Tells which resource to show when iconic
  913. Dim LineL%, LineR%  ' Range of a click on gauge line
  914.  
  915. Sub ChangeWarn (ByVal Index%, ByVal Change%)
  916.   '  Move a warning level pointer up or down by specified percent
  917.   WarnLevPtr(Index).Tag = WarnLevPtr(Index).Tag + Change
  918.   If WarnLevPtr(Index).Tag > 100 Then WarnLevPtr(Index).Tag = 100
  919.   If WarnLevPtr(Index).Tag < 0 Then WarnLevPtr(Index).Tag = 0
  920.   ' Place the pointer and adjust the labels
  921.   PlaceWarnPtr Index
  922. End Sub
  923.  
  924. Sub Form_Load ()
  925.   ' If a previous instance is running, activate it instead
  926.   Dim SaveTitle As String * 40
  927.   If App.PrevInstance Then
  928.     SaveTitle$ = App.Title
  929.     App.Title = "... duplicate instance."
  930.     Form1.Caption = "... duplicate instance."
  931.     AppActivate SaveTitle$
  932.     SendKeys "% R", True
  933.     End
  934.   End If
  935.  
  936.   ' Initialize two variables used in calculating pointer positions.
  937.   ' Gauge line starts and ends 7 pixels from top/bottom of bitmap.
  938.   TopAdj = 7 * Screen.TwipsPerPixelY
  939.   GHeight = 200 * Screen.TwipsPerPixelY
  940.   
  941.   ' Include gauges for up to four fixed disks.  Use GetDriveType to
  942.   ' check each possible drive letter - only monitor those whose type
  943.   ' is DRIVE_FIXED
  944.   ActualGauges = 4
  945.   Dim N%, Disk As String * 2
  946.   N = 0
  947.   Do While (N < 26) And (ActualGauges < NumGauges)
  948.     If GetDriveType(N) = DRIVE_FIXED Then
  949.       GaugeMain(ActualGauges).TabStop = True
  950.       Disk = Chr$(N + 65) + ":"
  951.       HeadingLab(ActualGauges).Caption = "Drive " + Disk
  952.       ' Tag for HeadingLab is disk NUMBER for disk size functions
  953.       HeadingLab(ActualGauges).Tag = N + 1
  954.       Load Form1.mnu_Icon(ActualGauges)
  955.       Form1.mnu_Icon(ActualGauges).Caption = "Drive &" + Disk
  956.       Form1.mnu_Icon(ActualGauges).Visible = True
  957.       Form1.mnu_Icon(ActualGauges).HelpContextID = 3
  958.       ActualGauges = ActualGauges + 1
  959.     End If
  960.     N = N + 1
  961.   Loop
  962.   ' Shrink the form to chop off any unused drive gauges
  963.   Width = GaugeMain(ActualGauges - 1).Left
  964.   Width = Width + GaugeMain(ActualGauges - 1).Width
  965.   Width = Width + (16 * Screen.TwipsPerPixelX)
  966.  
  967.   LoadFromIni
  968.   Randomize
  969.  
  970.   ' To save EXE size, we store each picture ONCE in the EXE and
  971.   ' copy it to the other elements of the same control array.
  972.   Dim X%
  973.   X = GaugeMain(0).Width - WarnLevPtr(0).Width
  974.   For N = 0 To ActualGauges - 1
  975.     CurrValPtr(N).Picture = CurrValPtr(0).Picture
  976.     WarnLevPtr(N).Picture = WarnLevPtr(0).Picture
  977.     WarnLevPtr(N).DragIcon = WarnLevPtr(0).DragIcon
  978.     GaugeMain(N).Picture = GaugeMain(0).Picture
  979.     PlaceWarnPtr N
  980.   Next N
  981.  
  982.   ' Get the total system memory
  983.   Dim mmi As tagMemManInfo
  984.   mmi.Size = MMIsize
  985.   Dim Success%
  986.   Success = MemManInfo(mmi)
  987.   GaugeMain(3).Tag = mmi.TotalPages + mmi.SwapFilePages
  988.   GaugeMain(3).Tag = GaugeMain(3).Tag * mmi.PageSize
  989.   MaxValueLab(3).Caption = MegaOrKilo(GaugeMain(3).Tag)
  990.  
  991.   ' Get the size of each fixed drive
  992.   For N = 4 To ActualGauges - 1
  993.     GaugeMain(N).Tag = GetDiskSize(HeadingLab(N).Tag)
  994.     MaxValueLab(N).Caption = MegaOrKilo(GaugeMain(N).Tag)
  995.   Next N
  996.  
  997.   ' Set left and right boundaries of the area on each gauge that will
  998.   ' be accepted as a click ON the gauge's vertical line.
  999.   LineL = GaugeMain(0).Width \ 2 - 60
  1000.   LineR = LineL + 120
  1001. End Sub
  1002.  
  1003. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  1004.   SaveToIni
  1005.   Cancel = 0
  1006. End Sub
  1007.  
  1008. Sub Form_Resize ()
  1009.   ' If iconic, indicate which resource is being displayed
  1010.   If WindowState = 1 Then
  1011.     Caption = "Monitor " + HeadingLab(WhichIcon).Caption
  1012.   Else
  1013.     Caption = "System Monitor"
  1014.   End If
  1015. End Sub
  1016.  
  1017. Sub GaugeMain_DragDrop (Index As Integer, Source As Control, X As Single, Y As Single)
  1018.   ' Don't allow dropping onto a different gauge!
  1019.   If Source.Index <> Index Then Exit Sub
  1020.   ' Adjust position to stay within 0-100%
  1021.   If Y > TopAdj + GHeight Then Y = TopAdj + GHeight
  1022.   If Y < TopAdj Then Y = TopAdj
  1023.   ' Calculate new percent based on new position
  1024.   Source.Tag = (TopAdj + GHeight - Y) * 100 \ GHeight
  1025.   ' Place the pointer and adjust the labels
  1026.   PlaceWarnPtr Index
  1027. End Sub
  1028.  
  1029. Sub GaugeMain_GotFocus (Index As Integer)
  1030.   ' Indicate the selected gauge by highlighting its warn label
  1031.   WarnLabel(Index).BackColor = &H808080
  1032. End Sub
  1033.  
  1034. Sub GaugeMain_KeyUp (Index As Integer, KeyCode As Integer, Shift As Integer)
  1035.   ' When it receives an up or downarrow, the Picture Box tweaks
  1036.   ' the warning level up or down by one percent.  When
  1037.   ' it receives PgUp or PgDn, it tweaks the level by five percent
  1038.   Select Case KeyCode
  1039.     Case KEY_UP
  1040.       ChangeWarn ActiveControl.Index, 1
  1041.     Case KEY_DOWN
  1042.       ChangeWarn ActiveControl.Index, -1
  1043.     Case KEY_PRIOR ' PgUp
  1044.       ChangeWarn ActiveControl.Index, 5
  1045.     Case KEY_NEXT ' PgDn
  1046.       ChangeWarn ActiveControl.Index, -5
  1047.   End Select
  1048. End Sub
  1049.  
  1050. Sub GaugeMain_LostFocus (Index As Integer)
  1051.   ' Indicate the unselected gauge by unhighlighting its warn label
  1052.   WarnLabel(Index).BackColor = 0
  1053. End Sub
  1054.  
  1055. Sub GaugeMain_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  1056.   ' If the user clicked on the line in the middle of the gauge...
  1057.   If (X >= LineL) And (X <= LineR) Then
  1058.     ' If they clicked above warning pointer, raise it, else lower it
  1059.     Dim Locat!
  1060.     Locat = (TopAdj + GHeight - Y) * 100 \ GHeight
  1061.     If Locat > WarnLevPtr(Index).Tag Then
  1062.       ChangeWarn Index, 1
  1063.     Else
  1064.       ChangeWarn Index, -1
  1065.     End If
  1066.   End If
  1067. End Sub
  1068.  
  1069. Sub HeadingLab_Click (Index As Integer)
  1070.   ' Click on label at gauge top to display that resource when iconic.
  1071.   SelectIconReport (Index)
  1072. End Sub
  1073.  
  1074. Sub LoadFromIni ()
  1075.   ' Load program options from MONTOR.INI
  1076.   mnu_Options(0).Checked = GetPrivateProfileInt("Options", "Jiggle Pointers", True, "MONTOR.INI")
  1077.   mnu_Options(1).Checked = GetPrivateProfileInt("Options", "Save Settings", True, "MONTOR.INI")
  1078.   Dim IconRpt%
  1079.   IconRpt = GetPrivateProfileInt("Icon Display", "Icon", 0, "MONTOR.INI")
  1080.   SelectIconReport (IconRpt)
  1081.   ' Get warning level for each gauge, or default of 20%
  1082.   Dim N%
  1083.   For N = 0 To ActualGauges - 1
  1084.     WarnLevPtr(N).Tag = GetPrivateProfileInt("Warning Levels", "Gauge" + Str$(N), 20, "MONTOR.INI")
  1085.   Next N
  1086. End Sub
  1087.  
  1088. Function MegaOrKilo$ (ByVal Amount&)
  1089.   ' Display below 1 million kilobytes as k, greater as M
  1090.   Const Kilo% = &H400
  1091.   Const Mega& = &H100000
  1092.   If Amount >= 1000000 * Kilo Then
  1093.     MegaOrKilo = Format$(Amount \ Mega, "###,###,###") + "M"
  1094.   Else
  1095.     MegaOrKilo = Format$(Amount \ Kilo, "###,###") + "k"
  1096.   End If
  1097. End Function
  1098.  
  1099. Sub mnu_File_Click (Index As Integer)
  1100.   ' Note that form2 (About box) and form3 (warning dialog)
  1101.   ' are unloaded after each use.
  1102.   Unload Form1
  1103. End Sub
  1104.  
  1105. Sub mnu_Help_Click (Index As Integer)
  1106.   ' WinHelp and WinHelpByNum are declared in MONTOR.BAS.  VB programs
  1107.   ' have automatic context-sensitive help, but they need these API
  1108.   ' functions for menu-selected help.
  1109.   Dim Success%
  1110.   Select Case Index
  1111.     Case 0
  1112.       Success = WinHelpByNum(Form1.hWnd, App.HelpFile, HELP_CONTENTS, 0)
  1113.     Case 1
  1114.       Success = WinHelp(Form1.hWnd, App.HelpFile, HELP_PARTIALKEY, "")
  1115.     Case 2
  1116.       Success = WinHelpByNum(Form1.hWnd, App.HelpFile, HELP_HELPONHELP, 0)
  1117.     Case 4
  1118.       Form2.Show MODAL
  1119.       Unload Form2
  1120.   End Select
  1121. End Sub
  1122.  
  1123. Sub mnu_Icon_Click (Index As Integer)
  1124.   ' Select name from icon menu to display that resource when iconic.
  1125.   SelectIconReport (Index)
  1126. End Sub
  1127.  
  1128. Sub mnu_Options_Click (Index As Integer)
  1129.   ' Information about whether the two Options menu items are checked
  1130.   ' is simply stored in Checked property of the menu items.
  1131.   mnu_Options(Index).Checked = Not mnu_Options(Index).Checked
  1132. End Sub
  1133.  
  1134. Sub PlaceWarnPtr (ByVal Index%)
  1135.   ' The warning level pointer's tag contains the new percent - now
  1136.   ' adjust the labels and place the pointer to match that percent.
  1137.   ' Adjust the Warn At caption
  1138.   WarnLabel(Index).Caption = Str$(WarnLevPtr(Index).Tag) + "%"
  1139.   ' The gauge is exactly 200 pixels high
  1140.   Dim NewY%
  1141.   ' Set NewY to the *pixel* height corresponding to the percentage
  1142.   NewY = ((98 - WarnLevPtr(Index).Tag) * 2) - 1
  1143.   ' Convert NewY to twips (VB's unit of screen measurement)
  1144.   NewY = NewY * Screen.TwipsPerPixelY
  1145.   ' Adjust to start at the top of the gauge line
  1146.   NewY = NewY + TopAdj
  1147.   WarnLevPtr(Index).Move WarnLevPtr(Index).Left, NewY
  1148.   WarnLabel(Index).Tag = False
  1149. End Sub
  1150.  
  1151. Sub SaveToIni ()
  1152.   ' Write Save Settings option to MONTOR.INI; write the rest of the
  1153.   ' options only if Save Settings is TRUE
  1154.   Dim Success%
  1155.   Success% = WritePrivateProfileString("Options", "Save Settings", mnu_Options(1).Checked, "MONTOR.INI")
  1156.   If mnu_Options(1).Checked Then
  1157.     Success% = WritePrivateProfileString("Options", "Jiggle Pointers", mnu_Options(0).Checked, "MONTOR.INI")
  1158.     Success% = WritePrivateProfileString("Icon Display", "Icon", Str$(WhichIcon), "MONTOR.INI")
  1159.     Dim N%
  1160.     For N = 0 To ActualGauges - 1
  1161.       Success% = WritePrivateProfileString("Warning Levels", "Gauge" + Str$(N), WarnLevPtr(N).Tag, "MONTOR.INI")
  1162.     Next N
  1163.   End If
  1164. End Sub
  1165.  
  1166. Sub SelectIconReport (ByVal Index%)
  1167.   ' Un-check old selected item & set its label's background to black
  1168.   mnu_Icon(WhichIcon).Checked = False
  1169.   HeadingLab(WhichIcon).BackColor = 0
  1170.   ' Check new selected item & set its label's background to gray
  1171.   mnu_Icon(Index).Checked = True
  1172.   HeadingLab(Index).BackColor = &H808080
  1173.   WhichIcon = Index
  1174. End Sub
  1175.  
  1176. Sub Timer1_Timer ()
  1177.   ' This method is called about every two seconds - it updates all of
  1178.   ' the gauges and warns if any have dropped below the minimum.  If
  1179.   ' MONTOR is iconic, it draws the icon.
  1180.  
  1181.   ' Set current values for the system resource gauges
  1182.   Dim shi As TagSysHeapInfo
  1183.   shi.Size = SHIsize
  1184.   Dim Success%
  1185.   Success = SystemHeapInfo(shi)
  1186.   CurrValPtr(2).Tag = shi.UserFreePercent
  1187.   CurrValPtr(1).Tag = shi.GDIFreePercent
  1188.   If shi.UserFreePercent < shi.GDIFreePercent Then
  1189.     CurrValPtr(0).Tag = shi.UserFreePercent
  1190.   Else
  1191.     CurrValPtr(0).Tag = shi.GDIFreePercent
  1192.   End If
  1193.   
  1194.   ' Set and display current value for the memory gauge
  1195.   CurrValPtr(3).Tag = GetFreeSpace(0)
  1196.   CurrValLab(3).Caption = MegaOrKilo(CurrValPtr(3).Tag)
  1197.   ' Set and display current value for disk space gauges
  1198.   Dim N%
  1199.   For N = 4 To ActualGauges - 1
  1200.     CurrValPtr(N).Tag = GetDiskFree(HeadingLab(N).Tag)
  1201.     CurrValLab(N).Caption = MegaOrKilo(CurrValPtr(N).Tag)
  1202.   Next N
  1203.  
  1204.   ' Redisplay the pointers
  1205.   Dim Locat!, Percent!
  1206.   Dim NewCVY%
  1207.   For N = 0 To ActualGauges - 1
  1208.     ' Calculate the current percentage
  1209.     NewCVY = (100 * CurrValPtr(N).Tag) / GaugeMain(N).Tag
  1210.     PercentLab(N).Caption = Str$(NewCVY) + "%"
  1211.     NewCVY = ((98 - NewCVY) * 2) - 1
  1212.     NewCVY = NewCVY * Screen.TwipsPerPixelY
  1213.     NewCVY = NewCVY + TopAdj
  1214.     CurrValPtr(N).Move 0, NewCVY
  1215.   Next N
  1216.  
  1217.   ' If the "Jiggle Pointers" option is checked...
  1218.   If mnu_Options(0).Checked Then
  1219.     ' Blink the "pulse" circles
  1220.     Dim TempCol&
  1221.     TempCol = Circ(0).BackColor
  1222.     Circ(0).BackColor = Circ(1).BackColor
  1223.     Circ(1).BackColor = TempCol
  1224.     ' Jiggle the pointers
  1225.     Dim NewY%
  1226.     For N = 0 To ActualGauges - 1
  1227.       Select Case Rnd
  1228.         Case 0 To .2
  1229.           NewY = CurrValPtr(N).Top + Screen.TwipsPerPixelY
  1230.           CurrValPtr(N).Move CurrValPtr(N).Left, NewY
  1231.         Case .2 To .4
  1232.           NewY = CurrValPtr(N).Top - Screen.TwipsPerPixelY
  1233.           CurrValPtr(N).Move CurrValPtr(N).Left, NewY
  1234.       End Select
  1235.     Next N
  1236.   End If
  1237.  
  1238.   ' Check if any warnings are necessary
  1239.   For N = 0 To ActualGauges - 1
  1240.     Percent = (CurrValPtr(N).Tag * 100) / GaugeMain(N).Tag
  1241.     If Percent < WarnLevPtr(N).Tag Then
  1242.       If Not WarnLabel(N).Tag Then
  1243.         Select Case N
  1244.           Case 0 To 2
  1245.             ' Normally you would assign WnTx's value using one long
  1246.             ' program line.  Here it's built up gradually, so as to
  1247.             ' make it easier to publish the source code.
  1248.             WnTx = "Free " + HeadingLab(N).Caption + " resources have"
  1249.             WnTx = WnTx + " dropped below" + Str$(WarnLevPtr(N).Tag)
  1250.             WnTx = WnTx + "%." + Chr$(13) + Chr$(13) + "Even if you "
  1251.             WnTx = WnTx + "have plenty of memory free, you will not "
  1252.             WnTx = WnTx + "be able to run many more programs. "
  1253.             WnTx = WnTx + "Consider closing one or more programs."
  1254.             WarnHelp = 1
  1255.           Case 3
  1256.             WnTx = "Free memory has dropped below"
  1257.             WnTx = WnTx + Str$(WarnLevPtr(N).Tag) + "%." + Chr$(13)
  1258.             WnTx = WnTx + Chr$(13) + "Consider closing one or more "
  1259.             WnTx = WnTx + "programs."
  1260.             WarnHelp = 2
  1261.           Case 4 To ActualGauges
  1262.             WnTx = "Free disk space on " + HeadingLab(N) + " has "
  1263.             WnTx = WnTx + "dropped below" + Str$(WarnLevPtr(N).Tag)
  1264.             WnTx = WnTx + "%." + Chr$(13) + Chr$(13) + "Consider "
  1265.             WnTx = WnTx + "using File Manager to delete any files "
  1266.             WnTx = WnTx + "that are no longer needed."
  1267.             WarnHelp = 3
  1268.         End Select
  1269.         MessageBeep MB_ICONSTOP
  1270.         Form3.Show MODAL
  1271.         Unload Form3
  1272.         WarnLabel(N).Tag = True
  1273.       End If
  1274.     Else
  1275.       WarnLabel(N).Tag = False
  1276.     End If
  1277.   Next N
  1278.  
  1279.   ' If MONTOR is iconic, draw the icon
  1280.   If WindowState = 1 Then
  1281.     ' fill whole area with black
  1282.     Line (0, 0)-(ScaleWidth, ScaleHeight), 0, BF
  1283.     ' draw gauge-line near right side
  1284.     Line (ScaleWidth - 60, 0)-(ScaleWidth - 60, ScaleHeight)
  1285.     ' set location for writing percent value
  1286.     CurrentX = 2 * Screen.TwipsPerPixelX
  1287.     Percent = (CurrValPtr(WhichIcon).Tag) / GaugeMain(WhichIcon).Tag
  1288.     ' Set Y position to avoid printing on light/dark boundary
  1289.     If Percent < .5 Then
  1290.       CurrentY = Screen.TwipsPerPixelY
  1291.     Else
  1292.       CurrentY = ScaleHeight \ 2
  1293.     End If
  1294.     Print PercentLab(WhichIcon).Caption
  1295.     ' XOR the portion corresponding to free percentage
  1296.     DrawMode = 7
  1297.     Dim Y!
  1298.     Y = (1 - Percent) * (ScaleHeight)' - (2 * TopAdj))
  1299.     Line (0, Y)-(ScaleWidth, ScaleHeight), &HFFFFFF, BF
  1300.     DrawMode = 13
  1301.   End If
  1302. End Sub
  1303.  
  1304. Sub WarnLabel_Click (Index As Integer)
  1305.   GaugeMain(Index).SetFocus
  1306. End Sub
  1307.  
  1308.